define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
	
	var Model = function(){
		this.callParent();
	};

	Model.prototype.result = function(){
		//这里实现返回的逻辑
	};
    //专家接受以后
	Model.prototype.OKBtnClick = function(event){
         this.close();
<<<<<<< HEAD
	     justep.Shell.showPage("zsroom");
=======
	    $.ajax({
        type: "GET",
        url: window.yuming+'/videoconnects/vc/return?hid='+window.hid+'&login-token='+window.token+'&ifOrNot=1',     
        async: false,
        cache: false,

        success: function(datas){
             
              /*alert(roomid)
              alert(url)
              alert(hid)*/
           
             justep.Shell.showPage("shiroom");
             //location.href=window.roomurl;
            },
        error: function(XMLHttpRequest){

          alert("请求服务失败")
        }
        })
	     
	    
>>>>>>> db50113a5feef0605bbbc3a649d7e9809a12c455
		/*this.comp('wReceiver').windowEnsure(this.result());*/
	};
    //接受数据
	Model.prototype.wReceiverReceive = function(event){
       var data=this.comp('tuisong');
       data.clear();
       data.loadData([this.params.rowdata]);
       data.first(); 
      
	};
    //专家点击拒绝以后
	Model.prototype.cancelBtnClick = function(event){
        this.close();
	    $.ajax({
        type: "GET",
        url: window.yuming+'/videoconnects/vc/return?hid='+window.hid+'&login-token='+window.token+'&ifOrNot=2',     
        async: false,
        cache: false,

        success: function(datas){
             justep.Shell.showPage("main");
          
            },
        error: function(XMLHttpRequest){

          alert("拒绝推送失败！")
        }
        }) 
        
	};
   //请求牧民个人信息
	Model.prototype.modelLoad = function(event){
        var datas=this.comp('mumin');
            datas.clear(); 
            $.ajax({
               type: "GET",
               url: window.yuming+'/newherdsmans/newherdsman/han/'+window.hid+'?login-token='+window.token,     
               async: false,
               cache: false,
                     success: function(datass){
          
                                 var zuotis = {
                                              defaultValues : [{
                                                           "id" :datass.id,
                                                           "img" :'http://'+window.imgshou+datass.headerUrl,
                                                           "name" :datass.name
                           
                                                              }]
                                              };
                                  datas.newData(zuotis);
                      },
                     error: function(XMLHttpRequest){

                                         alert("请求服务失败")
                       }
              }) 
	};

	return Model;
});